package com.booksystem.campuslibrarymanagementsystem.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.booksystem.campuslibrarymanagementsystem.entity.ViolationTable;
import com.booksystem.campuslibrarymanagementsystem.mapper.ViolationTableMapper;
import com.booksystem.campuslibrarymanagementsystem.service.ViolationTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ViolationTableServiceImpl extends ServiceImpl<ViolationTableMapper, ViolationTable> implements ViolationTableService {
    @Autowired
    ViolationTableMapper violationTableMapper;


    @Override
    public List<ViolationTable> querydislist(String status) {
        return violationTableMapper.querydislist(status);
    }

    @Override
    public int savav(ViolationTable vio) {
        return violationTableMapper.savav(vio);
    }

    @Override
    public int deleteByAccountAndBookid(String account, int bookid) {
        return violationTableMapper.deleteByAccountAndBookid(account,bookid);
    }

    @Override
    public ViolationTable queryByvio(String account, int bookid) {
        return violationTableMapper.queryvio(account,bookid);
    }

/*    @Override
    public boolean upDataVio(int bookid, String title, String author, String category) {
        return violationTableMapper.upDataVio(bookid,title,author,category);
    }*/

    @Override
    public int updetaViolaionAlter(String violationType, int fineamount) {
        return violationTableMapper.upDataVio(violationType,fineamount);
    }


}
